#include <stdio.h>
void main()
{
	int x,y,i,gcm,lcm;
	printf("Please input data:\n");
	scanf("%d,%d",&x,&y);
	for(i=x;i>=1;i--)
		if((x%i==0)&&(y%i==0))
		break;
	gcm=i;
	lcm=x*y/gcm;
	printf("gcm=%d,lcm=%d\n",gcm,lcm);
}
